import request from '@/utils/request'

// 查询资讯-文章列表
export function listArticle(query) {
  return request({
    url: '/zx/article/list',
    method: 'get',
    params: query
  })
}

// 查询资讯-文章详细
export function getArticle(id) {
  return request({
    url: '/zx/article/' + id,
    method: 'get'
  })
}

// 新增资讯-文章
export function addArticle(data) {
  return request({
    url: '/zx/article',
    method: 'post',
    data: data
  })
}

// 修改资讯-文章
export function updateArticle(data) {
  return request({
    url: '/zx/article',
    method: 'put',
    data: data
  })
}

// 删除资讯-文章
export function delArticle(id) {
  return request({
    url: '/zx/article/' + id,
    method: 'delete'
  })
}

// 添加页面
export function getAdd(query) {
  return request({
    url:'/zx/article/add',
    method: 'get',
    params:query
  })
}
//类型字典
export function  getArticleTypeList(query) {
  return request({
    url:'/zx/article/getArticleTypeList',
    method: 'get',
    params:query
  })
}

// 导出资讯-文章
export function exportArticle(query) {
  return request({
    url: '/zx/article/export',
    method: 'get',
    params: query
  })
}
